#ifndef SERVER_RESPONSE_HANDLER
#define SERVER_RESPONSE_HANDLER
#include <QThread>
#include <QDebug>
#include <QTcpSocket>
#include <QTcpServer>
#include <QTimer>
//#include "server.h"
class Server;

class ServerRespHandler : public QThread
{
	Q_OBJECT
public:
	ServerRespHandler(Server *servRef);

	
	~ServerRespHandler();

	void run();
	void stopThread();
signals:
	void completed();
public slots:
//	void handleClientResponse();
//	void handleRead();
	
//	void handleError(QAbstractSocket::SocketError);
//	void handleTimeout();

private:
	
	Server	*serverRef;
	QTcpServer *respSocket;
	QTcpSocket *clientSocket;
	QTimer *quitTimer;
	QDataStream *in;

	QString *XMLResponse;

//	quint32 blockSize;

	bool finito;

};

#endif